# -----------------------------------------------
# Author: yuz
# Copyright: 湖南零檬信息技术有限公司
# Email: wagyu2016@163.com
# Phone&Wechat: 18173179913
# Site: http://www.lemonban.com
# Forum: http://testingpai.com
# -----------------------------------------------

price = 'sf'
weight = ''

try:
    price = float(price)
    weight = float(weight)

    if price > 0 and weight > 0:
        total = price * weight
        print(total)
    else:
        print("异常的数字")
except ValueError as e:
    print(f"异常的类型{e}")